import request from '@/utils/request'

// --------------------方法数量规则--------------------------
// 检测类别级联接口
export function getMethodList(query) {
    return request({
        url: '/lims/priceRule/methodList',
        method: 'get',
        params: query
    })
}

// 检测方法级联接口
export function getGroupList(query) {
    return request({
        url: '/lims/priceRule/groupList',
        method: 'get',
        params: query
    })
}

// 数量规则保存
export function addCountList(data) {
    return request({
        url: '/lims/priceRule/method',
        method: 'post',
        data: data
    })
}

// 获取数量规则列表
export function getCountList(query) {
    return request({
        url: '/lims/priceRule/method/list',
        method: 'get',
        params: query
    })
}

// 数量规则编辑回显
export function getCountRow(mPId) {
    return request({
        url: '/lims/priceRule/method/' + mPId,
        method: 'get',
    })
}

// 数量规则删除
export function delCountRow(mPIds) {
    return request({
        url: '/lims/priceRule/method/delete/' + mPIds,
        method: 'delete',
    })
}

// ---------------------项目方法包规则---------------------

// 项目方法包保存
export function addWrapList(data) {
    return request({
        url: '/lims/priceRule/package',
        method: 'post',
        data: data
    })
}

// 获取项目方法包列表
export function getWrapList(query) {
    return request({
        url: '/lims/priceRule/package/list',
        method: 'get',
        params: query
    })
}

// 项目方法包编辑回显
export function getWrapRow(pPId) {
    return request({
        url: '/lims/priceRule/package/' + pPId,
        method: 'get',
    })
}

// 项目方法包删除
export function delWrapRow(pPIds) {
    return request({
        url: '/lims/priceRule/package/delete/' + pPIds,
        method: 'delete',
    })
}

// ---------------------其它费用规则---------------------

// 其它费用保存
export function addCostList(data) {
    return request({
        url: '/lims/priceRule/other',
        method: 'post',
        data: data
    })
}

// 获取其它费用列表
export function getCostList(query) {
    return request({
        url: '/lims/priceRule/other/list',
        method: 'get',
        params: query
    })
}

// 其它费用编辑回显
export function getCostRow(oPId) {
    return request({
        url: '/lims/priceRule/other/' + oPId,
        method: 'get',
    })
}

// 其它费用删除
export function delCostRow(oPIds) {
    return request({
        url: '/lims/priceRule/other/delete/' + oPIds,
        method: 'delete',
    })
}